package com.zoffy.catdiarybackend.common;

public enum StateCode {
    SUCCESS(200,"Success"),
    PARAMS_ERROR(40000, "请求参数错误"),
    PARAMS_DELETION(40001, "请求参数不全"),
    LOGIN_ERROR(40010, "登陆失败"),
    NOT_LOGIN_ERROR(40100, "未登录"),
    NO_AUTH_ERROR(40101, "无权限"),
    NOT_FOUND_ERROR(40400, "请求数据不存在"),
    FORBIDDEN_ERROR(40300, "禁止访问"),
    ABNORMAL_OPERATION(40010,"异常操作"),
    SYSTEM_ERROR(50000, "系统内部异常"),
    OPERATION_ERROR(50001, "操作失败"),
    DATABASE_ERROR(50002, "数据库错误");


    private final int code;
    private final String message;
    StateCode(int code,String message){
        this.code=code;
        this.message=message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
